package com.weaver.qfengx;

import weaver.email.EmailWorkRunnable;

/**
 * 系统邮件操作类
 */
public class EmailUtils {

    /**
     *  邮件发送
     * @param sendTo        收件人，邮箱地址，多地址时用英文逗号分隔
     * @param emailTitle    邮件标题
     * @param emailInfo     邮件内容
     * @param emailFileIds  邮件附件ids
     * @return
     */
    public static boolean sendMail(String sendTo, String emailTitle, String emailInfo,
                                   String emailFileIds){
        EmailWorkRunnable emailWorkRunnable = new EmailWorkRunnable(sendTo, emailTitle, emailInfo);
        emailWorkRunnable.setImagefileids(emailFileIds);
        //投递结果
        return emailWorkRunnable.emailCommonRemind();
    }


    /**
     *  邮件发送
     * @param sendTo        收件人，邮箱地址，多地址时用英文逗号分隔
     * @param emailTitle    邮件标题
     * @param emailInfo     邮件内容
     * @return
     */
    public static boolean sendMail(String sendTo, String emailTitle, String emailInfo){
        EmailWorkRunnable emailWorkRunnable = new EmailWorkRunnable(sendTo, emailTitle, emailInfo);
        //投递结果
        return emailWorkRunnable.emailCommonRemind();
    }


}
